<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
class Money_config extends MY_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->verify_user();
	}

	public function index()
	{
		$d = $this->db->get('money_config')->row_array();
		$this->view('money_config', $d);
	}

	public function update()
	{
		$xnb_fill_min = $this->input->post('xnb_fill_min');
		$xnb_fill_notice = $this->input->post('xnb_fill_notice');
		$xnb_draw_min = $this->input->post('xnb_draw_min');
		$xnb_draw_notice = $this->input->post('xnb_draw_notice');
		$xnb_dec = $this->input->post('xnb_dec');
		$xnb_draw_fee = $this->input->post('xnb_draw_fee');
		$main_account_pwd = $this->input->post('main_account_pwd');
		$main_account_address = $this->input->post('main_account_address');
		$is_eth_fill = $this->input->post('is_eth_fill');
		$data = array('xnb_fill_min' => $xnb_fill_min, 'xnb_fill_notice' => $xnb_fill_notice, 'xnb_draw_min' => $xnb_draw_min, 'xnb_draw_notice' => $xnb_draw_notice, 'xnb_dec' => $xnb_dec, 'xnb_draw_fee' => $xnb_draw_fee, 'main_account_pwd' => $main_account_pwd, 'main_account_address' => $main_account_address, 'is_eth_fill' => $is_eth_fill);

		if ($this->db->update('money_config', $data)) {
			echo json_encode(array('msg' => '修改成功', 'error' => 0));
		}
		else {
			echo json_encode(array('msg' => '修改失败', 'error' => 1));
		}
	}
}

?>
